function Y=applyHFilter2D(X,Hhat)
%
% Apply the convolution filter that corresponds to the gram operator of the
% pseudo-polar Fourier transform to the volume X.
%
% X should be a volume of size nxnxn, and H should be a convolution filter
% for size n, as generared by makeppftfilter(n).
%
% Yoel Shkolnisky, December 2010.


    n=size(X,1);
    L=3*n-2; %n+2n-1-1
    Xhat=fftn(X,[L L]);
    Y=ifftn(Xhat.*Hhat);
    Y=Y(n:2*n-1,n:2*n-1);


    %Xhat=fft2(Xhat);
    %Y=Xhat.*Hhat;
    %Y=ifft2(Y);




